package com.lej.player

import com.shuyu.gsyvideoplayer.player.IjkPlayerManager
import com.shuyu.gsyvideoplayer.player.PlayerFactory
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
//import tv.danmaku.ijk.media.exo2.Exo2PlayerManager

object Player {
    fun init() {
        //EXOPlayer 内核，支持格式更多
        PlayerFactory.setPlayManager(IjkPlayerManager::class.java)
//        //exo 缓存模式，支持 m3u8，只支持 exo
//        CacheFactory.setCacheManager(ExoPlayerCacheManager::class.java)
        //切换渲染模式
        GSYVideoType.setShowType(GSYVideoType.SCREEN_TYPE_FULL)

        //切换绘制模式
        //        GSYVideoType.setRenderType(GSYVideoType.SUFRACE);
        //        GSYVideoType.setRenderType(GSYVideoType.GLSURFACE);
        GSYVideoType.setRenderType(GSYVideoType.TEXTURE)

        /*
         * SCREEN_TYPE_CUSTOM 下自定义显示比例
         * @param screenScaleRatio  高宽比，如 16：9
         */
        GSYVideoType.setScreenScaleRatio(0.75f)
    }
}
